using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;

using Business_Objects.BusinessRules;
using Business_Object;

namespace Business_Objects
{
    /// <summary>
    /// Class that holds information about a customer.
    /// </summary>
    /// <remarks>
    /// Enterprise Design Pattern: Domain Model, Identity Field.
    /// 
    /// This is also the place where business rules are established.
    /// 
    /// The Domain Model Design Pattern states that domain objects incorporate 
    /// both behavior and data. Behavior may include simple or complex business logic.
    /// 
    /// The Identity Field Design Pattern saves the ID field in an object to maintain
    /// identity between an in-memory business object and that database rows.
    /// </remarks>
    public class BaoAn : BusinessObject
    {
        private Guid _id;
		private DateTime _ngayBaoAn;
		private Guid _classID = Guid.Empty;
		private Guid _studentID = Guid.Empty;
		private Guid _schoolYearID = Guid.Empty;
		private bool _baoan;
		

		
        /// <summary>
        /// Default constructor for customer class.
        /// Initializes automatic properties.
        /// </summary>
        public BaoAn()
        {
            // Default property values
           // Orders = new List<Order>();

            // Business rules
            AddRule(new ValidateId("CustomerId"));

            AddRule(new ValidateRequired("Company"));
            AddRule(new ValidateLength("Company", 1, 40));

            AddRule(new ValidateRequired("City"));
            AddRule(new ValidateLength("City", 1, 15));

            AddRule(new ValidateRequired("Country"));
            AddRule(new ValidateLength("Country", 1, 15));

          //  Version = _versionDefault;
        }
        public BaoAn(Guid id, DateTime ngayBaoAn, Guid classID, Guid studentID, Guid schoolYearID,bool baoan)
        {
            Id = id;
            NgayBaoAn = ngayBaoAn;
            ClassID = classID;
            StudentID = studentID;
            SchoolYearID = schoolYearID;
            Baoan = baoan;
        }
        #region Public Properties
        public Guid Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public DateTime NgayBaoAn
        {
            get { return _ngayBaoAn; }
            set { _ngayBaoAn = value; }
        }

        public Guid ClassID
        {
            get { return _classID; }
            set { _classID = value; }
        }

        public Guid StudentID
        {
            get { return _studentID; }
            set { _studentID = value; }
        }

        public Guid SchoolYearID
        {
            get { return _schoolYearID; }
            set { _schoolYearID = value; }
        }

        public bool Baoan
        {
            get { return _baoan; }
            set { _baoan = value; }
        }
        #endregion
    }
}
